/*
 * @Author: dingxiao
 * @Date: 2025-06-20 13:46:31
 * @Description: 工作安排默认值
 */
import DefaultResult from '../../common/DefaultResult';

class ResearchWorkArrangementResult extends DefaultResult {
  constructor(data, param) {
    super(param);
    this.data = data;
  }

  /**
   * 获取表单返回值结果
   * @returns 表单保存的返回值
   */
  getData = () => {
    const { data, param } = this;
    const params = data ?? this.getDraftParams(param);
    const {
      // 业务表单自定义数据
      documentInfo,
    } = params;
    const document = JSON.parse(documentInfo);

    return {
      ...params,
      ...document,
      researchForm: document.researchForm ?? '线下调研',
    };
  }
}
export default ResearchWorkArrangementResult;
